const express = require('express');
const router = new express.Router();

/**
 * @param {Object} options
 * @param {} options.brandId 品牌Id
 * @param {} options.dealerId 服务站Id
 * @throws {Error}
 * @return {Promise}
 */
router.get('/', async(req, res, next) => {
    const options = {
        brandId: req.query.brandId,
        dealerId: req.query.dealerId
    };
    const data = {
        message: 'message',
        payload: {
            expenseAdjustments: [
                {
                    dealerCode: 'dealerCode343',
                    brandCode: 'brandCode344',
                    businessType: 1,
                    materialFee: 1,
                    mgmtFee: 1,
                    outFee: 1,
                    laborFee: 1,
                    assistantFee: 1,
                    totalFee: 1,
                    submitTime: '2019-09-18T09:25:19Z',
                    currency: 1,
                    department: 'department',
                    tradeMethodCode: 'tradeMethodCode345',
                    tradeMethodName: 'tradeMethodName346',
                    manufacturerName: 'manufacturerName347',
                    remark: 'remark',
                    details: [
                        {
                            id: 'id348',
                            dealerCode: 'dealerCode349',
                            brandCode: 'brandCode350',
                            code: 'code351',
                            submitTime: '2019-09-18T09:25:19Z',
                            repairType: 1,
                            vin: 'vin',
                            causePartCode: 'causePartCode352',
                            causePartName: 'causePartName353',
                            materialFee: 1,
                            mgmtFee: 1,
                            outFee: 1,
                            laborFee: 1,
                            accessoryFee: 1,
                            totalFee: 1,
                            currency: 1,
                            productCategoryCode: 'productCategoryCode354',
                            rowVersion: 'rowVersion'
                        }
                    ]
                },
                {
                    dealerCode: 'dealerCode355',
                    brandCode: 'brandCode356',
                    businessType: 1,
                    materialFee: 1,
                    mgmtFee: 1,
                    laborFee: 1,
                    outFee: 1,
                    assistantFee: 1,
                    totalFee: 1,
                    department: 'department',
                    submitTime: '2019-09-18T09:25:19Z',
                    currency: 1,
                    tradeMethodCode: 'tradeMethodCode357',
                    tradeMethodName: 'tradeMethodName358',
                    manufacturerName: 'manufacturerName359',
                    remark: 'remark',
                    details: [
                        {
                            id: 'id348',
                            dealerCode: 'dealerCode349',
                            brandCode: 'brandCode350',
                            code: 'code351',
                            submitTime: '2019-09-18T09:25:19Z',
                            repairType: 1,
                            vin: 'vin',
                            causePartCode: 'causePartCode352',
                            causePartName: 'causePartName353',
                            materialFee: 1,
                            mgmtFee: 1,
                            outFee: 1,
                            laborFee: 1,
                            accessoryFee: 1,
                            totalFee: 1,
                            currency: 1,
                            productCategoryCode: 'productCategoryCode354',
                            rowVersion: 'rowVersion'
                        }
                    ]
                }
            ],
            claims: [
                {
                    dealerCode: 'dealerCode360',
                    brandCode: 'brandCode361',
                    businessType: 1,
                    materialFee: 1,
                    mgmtFee: 1,
                    laborFee: 1,
                    outFee: 1,
                    assistantFee: 1,
                    totalFee: 1,
                    submitTime: '2019-09-18T09:25:19Z',
                    currency: 1,
                    department: 'department',
                    tradeMethodCode: 'tradeMethodCode362',
                    tradeMethodName: 'tradeMethodName363',
                    manufacturerName: 'manufacturerName364',
                    remark: 'remark',
                    details: [
                        {
                            id: 'id365',
                            dealerCode: 'dealerCode366',
                            brandCode: 'brandCode367',
                            code: 'code368',
                            submitTime: '2019-09-18T09:25:19Z',
                            repairType: 1,
                            vin: 'vin',
                            causePartCode: 'causePartCode369',
                            causePartName: 'causePartName370',
                            materialFee: 1,
                            mgmtFee: 1,
                            outFee: 1,
                            laborFee: 1,
                            accessoryFee: 1,
                            totalFee: 1,
                            currency: 1,
                            productCategoryCode: 'productCategoryCode371',
                            rowVersion: 'rowVersion'
                        }
                    ]
                },
                {
                    dealerCode: 'dealerCode372',
                    brandCode: 'brandCode373',
                    businessType: 1,
                    materialFee: 1,
                    mgmtFee: 1,
                    laborFee: 1,
                    outFee: 1,
                    assistantFee: 1,
                    totalFee: 1,
                    submitTime: '2019-09-18T09:25:19Z',
                    currency: 1,
                    tradeMethodCode: 'tradeMethodCode374',
                    tradeMethodName: 'tradeMethodName375',
                    manufacturerName: 'manufacturerName376',
                    remark: 'remark',
                    details: [
                        {
                            id: 'id365',
                            dealerCode: 'dealerCode366',
                            brandCode: 'brandCode367',
                            code: 'code368',
                            submitTime: '2019-09-18T09:25:19Z',
                            repairType: 1,
                            vin: 'vin',
                            causePartCode: 'causePartCode369',
                            causePartName: 'causePartName370',
                            materialFee: 1,
                            mgmtFee: 1,
                            outFee: 1,
                            laborFee: 1,
                            accessoryFee: 1,
                            totalFee: 1,
                            currency: 1,
                            productCategoryCode: 'productCategoryCode371',
                            rowVersion: 'rowVersion'
                        }
                    ]
                }
            ]
        }
    };
    res.json(data);
});
module.exports = router;
